package com.zsrt.java.day20170103.wrl.homework.demo02;

public class ImplCalDao implements ICalDao {

	@Override
	public int add(int...args) {
		int sum =0;
		for(int v : args){
			sum = sum + v;
		}
		return sum;
	}

	@Override
	public int sub(int x, int y) {
		return x-y;
	}

	@Override
	public int mul(int...args) {
		int sum =1;
		for(int v : args){
			sum = sum * v;
		}
		return sum;
	}

	@Override
	public int chu(int x, int y) {
		return x/y;
	}

}
